#!/bin/sh
echo input, please
read myvar
case "$myvar" in
 "yes" ) echo "Good morning";;
 "no" ) echo "Good afternoon";;
 "y" ) echo "Good morning";;
 "n" ) echo "Good afternoon";;
 * ) echo "Sorry, answer not recognised";;
esac



vi du case2

#!/bin/sh
echo "input, please"
read myvar
case "$myvar" in
 "yes" | "y" | "YES" ) echo "Good morning";;
 "no" | "n" | "NO" ) echo "Good afternoon";;
 * ) echo "Sorry, answer not recognised";;
 esac


 vidu case 3, dung ki tu dai dien

#!/bin/sh
echo "input, please"
read myvar
case "$myvar" in
 "yes" | "y" | "YES" )
 	echo "Good morning"
 	echo "ok";;
 "[nN]*"
    echo "Good affternoon"
    exit 1;;
esac

exit 0;